package com.gmail.hasszhao.testvolley.task;


import android.content.Context;

import com.android.volley.Response;
import com.gmail.hasszhao.testvolley.data.list.CategoryList;

public final class LoadCategoryListTask extends AbstractGsonRequest<CategoryList> {
    public static final String TAG = "LoadCategoryListTask";

    public LoadCategoryListTask(Context _context, int _method, String _url,
                                Response.Listener<CategoryList> _listener, Response.ErrorListener _errorListener) {
        super(_context, _method, _url, CategoryList.class, _listener, _errorListener);
        setTag(TAG);
    }

    @Override
    protected String changeJsonString(String _json) {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append("{\"categories\":").append(_json).append('}');
        return stringBuilder.toString();
    }
}
